<?php
require 'init.php';
extract($_GET);
$result = $db -> query("SELECT * FROM `newsinfo` WHERE `id` = '$id'");
$result = $result -> fetch_assoc();
echo json_encode([
    'code' => 200,
    'msg' => '获取成功',
    'data' => $result
])
?>